package com.baidu.elinkagescroll;

import ohos.agp.components.Component;

/**
 * Interface definition for a callback to be invoked
 * when the children in LinkageScrollLayout {@link ELinkageScrollLayout} trigger some important event.
 *
 * @since 2021/07/16.
 */
public interface ChildLinkageEvent {
    /**
     * Callback method to be invoked when the children in LinkageScrollLayout {@link ELinkageScrollLayout}
     * has been scrolled to top.</p>
     * @param target target
     */
    void onContentScrollToTop(Component target);

    /**
     * Callback method to be invoked when the children in LinkageScrollLayout {@link ELinkageScrollLayout}
     * has been scrolled to bottom.</p>
     * @param target target
     */
    void onContentScrollToBottom(Component target);

    /**
     * Callback method to be invoked when the children in LinkageScrollLayout {@link ELinkageScrollLayout}
     * has been scrolled.</p>
     * @param component Component
     */
    void onContentScroll(Component component);
}
